#include "stdinclude.h"
#include "input/InputSys.h"
#include "input/inputdata.h"
#include "input/inputprocessor.h"

#include "inputImpl/oisInputMgr.h"


InputSys::InputSys(AppRoot* const approot) 
	: BaseSubsystem(approot)
{
	this->_info = "InputSys non ancora inizializzato";
}


InputSys::~InputSys(void)
{		
}


void InputSys::init(const PlatformData& data)
{	
	m_inputMgr.reset (new InputMgrImpl(this));
	m_inputMgr->init(data);
	
	//std::unique_ptr<IProcessor> ip( new InputProcessor(this) );
	this->getAppRoot().getMainLoop().add( new InputProcessor(this) );

	_dbgout(getInfo());
}

void InputSys::shutdown()
{
//	BaseSubsystem::shutdown();

	m_inputMgr->shutdown();

}

void InputSys::captureInput()
{
	//delegate impl
	m_inputMgr->captureInput();
}